import request from '@/utils/request'
// 获取订单列表
export function getOrderList(data) {
  return request({
    url: '/capsule/pay/order/page',
    method: 'post',
    data: data
  })
}
// 太空舱基地列表
export function getRoomList(data) {
  return request({
    url: '/capsule/pay/order/capsuleInfoSelects',
    method: 'post',
    data: data
  })
}
// 太空舱规格列表
export function getSpaceroom(data) {
  return request({
    url: '/capsule/pay/order/capsuleSpecsSelects/' + data,
    method: 'get'
  })
}
// 订单详情
export function getRoomDetail(data) {
  return request({
    url: '/capsule/pay/order/getDetail/' + data,
    method: 'get'
  })
}
// 退款
export function refundOrder(data) {
  return request({
    url: '/capsule/pay/order/refundOrder',
    method: 'post',
    data: data
  })
}
// 退房记录
export function getRecordList(data) {
  return request({
    url: '/capsule/web/checkout/record/page',
    method: 'post',
    data: data
  })
}
// 审批
export function approveCheckOut(data) {
  return request({
    url: '/capsule/web/checkout/record/approveCheckOut',
    method: 'post',
    data: data
  })
}
// 开锁记录
export function getRoomLockRecords(data) {
  return request({
    url: '/capsule/room/roomLockRecords',
    method: 'post',
    data: data
  })
}
// 房间规格
export function spaceTypeSelect(data) {
  return request({
    url: '/capsule/pay/order/capsuleSpecsSelects/' + data,
    method: 'get'
  })
}
// 换房列表
export function houseList(data) {
  return request({
    url: '/capsule/pay/order/preChangeRooms/' + data,
    method: 'get'
  })
}
// 开始换房
export function onExchangeRoom(data) {
  return request({
    url: '/capsule/pay/order/exchangeRoom',
    method: 'post',
    data: data
  })
}
// 订单统计
export function conditionOrder(data) {
  return request({
    url: '/capsule/pay/order/sumPage',
    method: 'post',
    data: data
  })
}
// 导出
export function getExcelOrder(data) {
  return request({
    url: '/capsule/pay/order/excelOrderNew',
    method: 'post',
    responseType: 'blob',
    data:data
  })
}
//退款列表
export function refundPage(data) {
  return request({
    url: '/capsule/refund/order/refundPage',
    method: 'post',
    data: data
  })
}
// 退款审批
export function approveRefund(data) {
  return request({
    url: '/capsule/refund/order/approveRefund',
    method: 'post',
    data: data
  })
}
 // 发起退款（新接口）
export function onRefundOrder(data) {
  return request({
    url: '/capsule/refund/order/subRefund',
    method: 'post',
    data: data
  })
}
// 改价列表
export function onChangePriceList(data) {
  return request({
    url: '/capsule/room/change/changePage',
    method: 'post',
    data: data
  })
}
// 审批
export function noApproveChange(data) {
  return request({
    url: '/capsule/room/change/approveChange',
    method: 'post',
    data: data
  })
}
// 改价详情列表
export function getPriceChangeList(data) {
  return request({
    url: '/capsule/pay/order/change/pageByChange',
    method: 'post',
    data: data
  })
}
// 导出改价
export function getExcelPrice(data) {
  return request({
    url: '/capsule/pay/order/change/excelOrderByChangeNew',
    method: 'post',
    responseType: 'blob',
    data:data
  })
}

